#ifndef _ENTITYMANAGER_
#define _ENTITYMANAGER_

#include "Entity.hpp"
#include "Scripting/Scripting.hpp"
#include "Content/Map.hpp"
#include "Utilities/MemoryPool.hpp"
#include "ObjectManager.hpp"
#include <vector>

/** 
* Manager of a set of entities.
*/
class EntityManager:public ObjectManager{
protected:

public:
    Map* map;
    
	EntityManager();

	/** 
	* Update state of entities in EntityManager.
	* @param frameTime Engine frame time at update.
    */
	virtual void update(unsigned int frameTime) = 0;
	
	/** 
	* Create an entity in the entity manager.
	* @param name Name of entity to create.
	* @return Created entity, or 0 on failure.
    */
	virtual Entity* createEntity(const char* name) = 0;

	/** 
	* Destroy the given entity, remove it from manager.
	* @param ent The entity to destroy.
	* @return true on success, false if failed.
    */
	virtual bool destroyEntity(Entity* ent) = 0;
};

#endif